package liu.first;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * 3、读取一个文件在控制台打印出来
 * @author My
 *
 */
public class IOReadFile {
	
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		try {
			File file=new File("src/main/resource/interview/xx.java");
			
			Reader in = new FileReader(file);
			
			BufferedReader br=new BufferedReader(in);
			String st;
			while((st=br.readLine())!=null){
				System.out.println(st);
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	
	}

}
